<%@ page import="com.zhangmengyuan.medical.entity.User" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%User user= (User)request.getAttribute("user"); %>
<center>
	<form method="post" action="${pageContext.request.contextPath}/UserServlet?service=man_modify">
		<span style="font-size:20px;" class="htext"><b>用户修改</b></span>(<span style="color:red; "> * </span>为必填项)
		<div class="form-group">
			<label> 用&nbsp;&nbsp;户&nbsp;&nbsp;名：</label>
			<input type="text" name="userName"  class="form-control" value="<%=user.getUserName()%>" readonly="readonly"  placeholder="用户名不能修改"><span style="color:red; ">*</span>
		</div>
		<div class="form-group">
			<label>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
			<input type="password" name="passWord"  class="form-control" value="<%=user.getPassWord()%>"  placeholder="密码应大于6位小于14位"><span style="color:red; ">*</span>
		</div>
		<div class="form-group">
			<label>密码问题：</label>
			<input type="text" name="pwdQuestion"  class="form-control" value="<%=user.getPwdQuestion()%>"  placeholder="记住提出的问题"><span style="color:red; ">*</span>
		</div>
		<div class="form-group">
			<label>问题答案：</label>
			<input type="text" name="pwdAnswer"  class="form-control" value="$<%=user.getPwdAnswer()%>"  placeholder="记住答案"><span style="color:red; ">*</span>
		</div>
		<div class="form-group">
			<label>电子邮箱：</label>
			<input type="text" name="email"  class="form-control" value="<%=user.getEmail()%>"  placeholder="邮箱格式应为常用邮箱地址"><span style="color:red; ">*</span>
		</div>
		<div class="form-group">
			<label>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：</label>
			<input type="radio" name="sex" value="1" class="form-control" <%=user!=null&&"1".equals(user.getSex()) ? "checked" : "" %> >男
			<input type="radio" name="sex" value="2" class="form-control" <%=user!=null&&"2".equals(user.getSex()) ? "checked" : "" %> >女
			<input type="radio" name="sex" value="2" class="form-control" <%=user!=null&&"3".equals(user.getSex()) ? "checked" : "" %> >保密
		</div>
		<div class="form-group">
			<label>手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机：</label>
			<input type="text" name="phone"  class="form-control" value="<%=user.getPhone()%>"  placeholder="">
		</div>
		<div class="form-group">
			<label>详细地址：</label>
			<input type="text" name="address"  class="form-control" value="<%=user.getAddress()%>"  placeholder="">
		</div>
		<div class="form-group">
			<label>邮政编码：</label>
			<input type="text" name="postCode"  class="form-control" value="<%=user.getPostCode()%>"  >
		</div>
		<div class="form-group">
			<label>权限：</label>
			<select name="power">
				<option value="0" <%=user.getPower()==0?" selected":"" %>>普通用户</option>
				<option value="1" <%=user.getPower()==1?" selected":"" %>>普通管理员</option>
			</select>
		</div>
		<div class="form-group">
			<label>状态：</label>
			<select name="state">
				<option value="0" <%=user.getState()==0?" selected":"" %>>正常</option>
				<option value="1" <%=user.getState()==1?" selected":"" %>>冻结</option>
			</select>
		</div>

		<input type="submit" value="提交" class="button">
		<input type="reset" value="重置" class="button" onClick="init();">



	</form>
</center>
